<script setup lang='ts'>
import { useInfoStore } from "../../store/modules/info.js";
defineOptions({
    name: ''
})
const props = defineProps<{
    deviceStatus: number
}>()
</script>

<template>
    <div class="out-line">
        <!-- 加上过渡 -->
        <img v-if="useInfoStore().deviceStatus === '0'" src="../../assets/deviceOutBg@2x.png" alt="">
        <img v-else src="../../assets/bleOutBg@2x.png" alt="">
        <span v-if="useInfoStore().deviceStatus === '0'">设备未连接</span>
        <span  v-else>蓝牙未连接</span>
    </div>
</template>

<style lang='scss' scoped>
.out-line {
    height: 327px;
    width: 308px;
    // background: linear-gradient(180deg, #F4F9FD 0%, #EFF4FA 100%);
    box-shadow: 0px 10px 8px 2px rgba(113, 125, 144, 0.09);
    border-radius: 10px;
    // backdrop-filter: blur(0px);
    background-image: url('../../assets/deviceOutlineBg@2x.png') no-repeat;
    background-size: 100% 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
    background-color: #fff;

    img {
        width: 100px;
        height: 90px;
        margin-top: 56px;
    }

    span {
        font-size: 12px;
        font-family: AlibabaPuHuiTi-Regular, AlibabaPuHuiTi;
        font-weight: 400;
        color: #8795A4;
        margin-top: 10px;
    }
}

.fade-enter-from,
    .fade-leave-to {
        /*定义进入开始和离开结束的透明度为0*/
        opacity: 0;
    }

    .fade-enter-to,
    .fade-leave-from {
        /*定义进入结束和离开开始的透明度为1*/
        opacity: 1;
    }

    .fade-leave-active,
    .fade-enter-active {
        transition: all 0.5s ease-out;
    }
</style>
